@layout("/common/container.html", {"title" : "数据导入", plugin: "dropzone"}){
<style>
    .dropzone .dz-preview .dz-image {
        width: 220px;
    }
</style>
<div class="kt-portlet">
    <#portlet:head title="数据导入-${object.name}" icon="la la-cloud-upload"/>
    <div class="kt-portlet__body">
        <form class="kt-form animated" id="import-temporary">
            <input type="hidden" id="importCode" value="${object.importCode}">
            <input type="hidden" id="templateId" value="${object.id}">
            <input type="hidden" id="hasLast" value="${hasLast}">
            <input type="hidden" id="path">
            <div class="alert alert-info" role="alert">
                <div class="alert-icon">
                    <i class="la la-exclamation"></i>
                </div>
                请先下载模板，填写完成后导入
            </div>
            <div class="form-group kt-form__group row">
                <div class="col-sm-12">
                    <div class="kt-dropzone dropzone" id="upload-excel">
                        <div class="kt-dropzone__msg dz-message needsclick">
                            <h3 class="kt-dropzone__msg-title">拖动文件到这里或者点击选择文件</h3>
                            <span class="kt-dropzone__msg-desc">仅允许上传xlsx、xls文件</span>
                        </div>
                    </div>
                </div>
            </div>
            <#btn id="download-template" btnType="info" icon="la la-cloud-download" name="下载模板" />
            <#btn id="import-data" btnType="success" icon="la la-cloud-upload" name="导入数据" />
        </form>
        <form class="kt-form kt-hide animated" id="temporary-list">
            @if(hasLast){
            <div class="alert alert-info alert-dismissible" id="last-tip" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true"><i class="la la-close"></i></span>
                </button>
                <div class="alert-icon">
                    <i class="la la-exclamation"></i>
                </div>
                表格中为上次导入未确认数据，如要放弃请点击重新选择文件
            </div>
            @}
            <div class="kt-hide" id="summary-info" role="alert">
                <div class="alert-icon">
                    <i class="la la-bar-chart"></i>
                </div>
            </div>
            <div class="btn-row">
                <#btn id="save-formal" btnType="success" icon="la la-save" name="保存正确数据到正式表" />
                <#btn id="export-fail" btnType="info" icon="la la-cloud-download" name="导出错误数据" />
                <#btn id="re-selection" btnType="warning" icon="la la-cloud-upload" name="重新选择文件" />
                <div class="col-md-3 col-12 kt- pull-right">
                    <div class="query-modular">
                        <div class="row">
                            <input type="hidden" name="templateId" value="${object.id}">
                            <div class="input-group">
                                <input type="text" id="field1" name="field1" class="form-control" placeholder="请输入关键字搜索">
                                <div class="input-group-append">
                                    <button class="btn btn-secondary" type="button" onclick="KTTool.selectData(this)"><i
                                            class="la la-search"></i></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="kt_datatable" id="sys_import_excel_data_list"></div>
        </form>
    </div>
</div>
<!--begin::页面脚本 -->
<script src="${ctxPath}/static/modular/sys/import/excel/data/list.js?v=${version()}" type="text/javascript"></script>
<!--end::页面脚本 -->
@}